﻿namespace CSharpPro._1106;

/// <summary>
/// 用户实体类，仅负责数据存储
/// </summary>
public class User
{
    // 私有字段
    private string _username;
    private string _password;

    // 无参构造函数
    public User() { }

    // 带参构造函数
    public User(string username, string password)
    {
        _username = username;
        _password = password;
    }

    // 用户名属性
    public string Username
    {
        get => _username;
        set => _username = value;
    }

    // 密码属性
    public string Password
    {
        get => _password;
        set => _password = value;
    }
}//